#!/bin/sh
sed -n -e 's/^\s*0x\([[:xdigit:]]\{8,\}\)\s*\(\([a-zA-Z_][a-zA-Z0-9_]*::\)*[a-zA-Z_][a-zA-Z0-9_]*\((\(\([a-zA-Z_][a-zA-Z0-9_]*\**, \)*\([a-zA-Z_][a-zA-Z0-9_]*\**\)\)\?)\)\?$\)/\1 \2/gp' $1 | sort >> $2
